<?
	include "loggedin.inc.php";
	require('../includes/messages.inc.php');
	require('../includes/config.inc.php');

	require("./header.php"); 
	require('../includes/styles.inc.php'); 
	require('../includes/prepend.inc.php');

	#//
	$ERR = "&nbsp;";
	
	// Total proccessed
	$q = "select * from PHPAUCTIONW_transactions inner join PHPAUCTION_users on PHPAUCTION_users.id =PHPAUCTIONW_transactions.userid  where ispaid = 1";
	if ($uid)
		$q .= " and userid='$uid'";
	$rsp = mysql_query($q) or die(mysql_error());
	
	$rspt = mysql_num_rows($rsp);
	
	$gato = array
	(
		"2co" => "2Checkout",
		"pp" => "PayPal",
		"storm" => "StormPay"
	);

?>

<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD>

	<CENTER>
	<FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="4"><BR>
	View payment transactions 
		</FONT><BR>
	<BR>
			<FORM NAME=conf ACTION=<?=basename($PHP_SELF)?> METHOD=POST  ENCTYPE="multipart/form-data">
				    
              <table width="550"  border="0" cellspacing="0" cellpadding="3">
                <tr bgcolor="#EEEEEE">
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>User</strong></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Date</strong></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Amount</strong></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Gate</strong></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Transaction ID </strong></font></td>
                </tr>
                <?
						while($row = mysql_fetch_assoc($rsp))
						{
						?>
                <tr>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="edituser.php?userid=<? echo $row['userid']; ?>&offset=0"><? echo $row['nick']; ?></a></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo date("m/d/y H:i:s", strtotime($row['dtpaid'])); ?></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">$<? echo $row['pamount']; ?></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo $gato[$row['gate']]; ?></font></td>
                  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><? echo $row['transid']; ?></font></td>
                </tr>
                <? } ?>
              </table>
            </FORM>
	<BR><BR>

	<FONT FACE="Verdana, Verdana, Arial, Helvetica, sans-serif" SIZE="2">
	<A HREF="admin.php" CLASS="links">Admin Home</A>
	</FONT>
	</CENTER>
	<BR><BR>

</TD>
</TR>
</TABLE>

<!-- Closing external table (header.php) -->
</TD>
</TR>
</TABLE>

<? require("./footer.php"); ?>
</BODY>
</HTML>
